package com.hs.srm.admin.modules.orders.dao;

import java.util.List;
import java.util.Map;

import org.apache.ibatis.annotations.Param;
import org.apache.ibatis.session.RowBounds;

import com.baomidou.mybatisplus.mapper.BaseMapper;
import com.baomidou.mybatisplus.mapper.Wrapper;
import com.hs.srm.admin.modules.orders.entity.StockEntity;
import com.hs.srm.admin.modules.orders.vo.StockItemVO;

/**
 * 采购订单行项目DAO接口
 * 
 * @author Sunnykid
 *
 * @date 2019年3月17日
 */
public interface StockDao extends BaseMapper<StockEntity> {

	// 分页查询数据
	List<StockEntity> selectDetailPage(RowBounds rowBounds, @Param("ew") Wrapper<StockEntity> wrapper,
			@Param("params") Map<String, Object> params);

	boolean insertStock(StockEntity stockEntity);

	int updaeStock(StockEntity stockEntity);

	List<StockEntity> findByPoItemIds(@Param("list") List<String> idList);

	int updateStockStatus(@Param("stockIds") String[] stockIds);

	List<StockEntity> selectStockByDdh(@Param("PoNo") String PoNo);

	StockEntity selectStockByPo(String poNo, String itemNo);

	List<StockItemVO> listStockItem(RowBounds rowBounds, @Param("ew") Wrapper<StockItemVO> wrapper,
			@Param("params") Map<String, Object> params);
}
